package org.wpchina.lawexam.main;

import org.wpchina.lawexam.R;

import android.content.Context;
import android.content.DialogInterface;
import android.view.View;

public class CustDialogBuilder
{
  private Context a;
  private String b;
  private String c;
  private String d;
  private String e;
  private View f;
  private int g;
  private boolean h;
  private int i;
  private DialogInterface.OnClickListener j;
  private DialogInterface.OnClickListener k;

  public CustDialogBuilder(Context paramContext)
  {
    this.a = paramContext;
    this.h = true;
    this.i = 0;
  }

  public CustDialog create()
  {
    CustDialog localCustomDialog = new CustDialog((Context)this.a);
    localCustomDialog.setContentView(R.layout.custdialog);
    return localCustomDialog;
  }

  public CustDialogBuilder setCancelable(boolean paramBoolean)
  {
    this.h = paramBoolean;
    return this;
  }

  public CustDialogBuilder setContentView(View paramView)
  {
    this.f = paramView;
    return this;
  }

  public CustDialogBuilder setContentViewId(int paramInt)
  {
    this.i = paramInt;
    return this;
  }

  public CustDialogBuilder setIcon(int paramInt)
  {
    this.g = paramInt;
    return this;
  }

  public CustDialogBuilder setMessage(int paramInt)
  {
    String str = (String)this.a.getText(paramInt);
    this.c = str;
    return this;
  }

  public CustDialogBuilder setMessage(String paramString)
  {
    this.c = paramString;
    return this;
  }

  public CustDialogBuilder setNegativeButton(int paramInt, DialogInterface.OnClickListener paramOnClickListener)
  {
    String str = (String)this.a.getText(paramInt);
    this.e = str;
    this.k = paramOnClickListener;
    return this;
  }

  public CustDialogBuilder setNegativeButton(String paramString, DialogInterface.OnClickListener paramOnClickListener)
  {
    this.e = paramString;
    this.k = paramOnClickListener;
    return this;
  }

  public CustDialogBuilder setPositiveButton(int paramInt, DialogInterface.OnClickListener paramOnClickListener)
  {
    String str = (String)this.a.getText(paramInt);
    this.d = str;
    this.j = paramOnClickListener;
    return this;
  }

  public CustDialogBuilder setPositiveButton(String paramString, DialogInterface.OnClickListener paramOnClickListener)
  {
    this.d = paramString;
    this.j = paramOnClickListener;
    return this;
  }

  public CustDialogBuilder setTitle(int paramInt)
  {
    String str = (String)this.a.getText(paramInt);
    this.b = str;
    return this;
  }

  public CustDialogBuilder setTitle(String paramString)
  {
    this.b = paramString;
    return this;
  }
}
